//
//  CHCycleScrollView.h
//  CHCycleview
//
//  Created by cyptt on 2022/5/27.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
typedef enum {
    CHCycleScrollViewPageContolAlimentRight,
    CHCycleScrollViewPageContolAlimentCenter
} CHCycleScrollViewPageContolAliment;

typedef enum {
    CHCycleScrollViewPageContolStyleClassic,        // 系统自带经典样式
    CHCycleScrollViewPageContolStyleAnimated,       // 动画效果pagecontrol
    CHCycleScrollViewPageContolStyleNone            // 不显示pagecontrol
} CHCycleScrollViewPageContolStyle;
@interface CHCycleScrollView : UIView

+ (instancetype)cycleScrollViewWithFrame:(CGRect)frame imageURLStringsGroup:(NSArray *)imageURLsGroup;



#pragma mark --数据源API 
/** 网络图片 url string 数组 */
@property (nonatomic, strong) NSArray *imageURLStringsGroup;
/** 每张图片对应要显示的文字数组 */
@property (nonatomic, strong) NSArray *titlesGroup;

//////////////////////  滚动控制API //////////////////////

/** 自动滚动间隔时间,默认2s */
@property (nonatomic, assign) CGFloat autoScrollTimeInterval;
/** 是否无限循环,默认Yes */
@property (nonatomic,assign) BOOL infiniteLoop;
/** 是否自动滚动,默认Yes */
@property (nonatomic,assign) BOOL autoScroll;
/** 只展示文字轮播 */
@property (nonatomic, assign) BOOL onlyDisplayText;
/** 占位图，用于网络未加载到图片时 */
@property (nonatomic, strong) UIImage *placeholderImage;

/** 分页控件位置 */
@property (nonatomic, assign) CHCycleScrollViewPageContolAliment pageControlAliment;
/** 轮播图片的ContentMode，默认为 UIViewContentModeScaleToFill */
@property (nonatomic, assign) UIViewContentMode bannerImageViewContentMode;
/** 轮播文字label字体颜色 */
@property (nonatomic, strong) UIColor *titleLabelTextColor;

/** 轮播文字label字体大小 */
@property (nonatomic, strong) UIFont  *titleLabelTextFont;

/** 轮播文字label背景颜色 */
@property (nonatomic, strong) UIColor *titleLabelBackgroundColor;

/** 轮播文字label高度 */
@property (nonatomic, assign) CGFloat titleLabelHeight;

/** 轮播文字label对齐方式 */
@property (nonatomic, assign) NSTextAlignment titleLabelTextAlignment;

@property (nonatomic, assign) CHCycleScrollViewPageContolStyle pageControlStyle;

@end

NS_ASSUME_NONNULL_END
